﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// UpPackBXinfo数据模型对象
    /// </summary>
    [Serializable]
    public partial class UpPackBXinfoMod
    {
        /// <summary>
        /// 初始化UpPackBXinfo数据模型对象
        /// </summary>
        public UpPackBXinfoMod()
        {
            
        }
        /// <summary>
        /// 初始化UpPackBXinfo数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="verKey">VerKey</param>
        /// <param name="version">Version</param>
        /// <param name="content">Content</param>
        public UpPackBXinfoMod(string verKey,string version,string content)
        {
            //给VerKey字段赋值
            this.VerKey = verKey;
            //给Version字段赋值
            this.Version = version;
            //给Content字段赋值
            this.Content = content;
        }
        /// <summary>
        /// 初始化UpPackBXinfo数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="verKey">VerKey</param>
        /// <param name="version">Version</param>
        /// <param name="content">Content</param>
        /// <param name="changeTime">ChangeTime</param>
        public UpPackBXinfoMod(string verKey,string version,string content,DateTime? changeTime)
        {
            //给VerKey字段赋值
            this.VerKey = verKey;
            //给Version字段赋值
            this.Version = version;
            //给Content字段赋值
            this.Content = content;
            //给ChangeTime字段赋值
            this.ChangeTime = changeTime;
        }
        
		//属性存储数据的变量
        private string _verKey;
        private string _version;
        private string _content;
        private DateTime? _changeTime;
        
        /// <summary>
        /// VerKey
        /// </summary>
        public string VerKey
        {
            get { return this._verKey; }
            set { this._verKey = value; }
        }
        /// <summary>
        /// Version
        /// </summary>
        public string Version
        {
            get { return this._version; }
            set { this._version = value; }
        }
        /// <summary>
        /// Content
        /// </summary>
        public string Content
        {
            get { return this._content; }
            set { this._content = value; }
        }
        /// <summary>
        /// ChangeTime
        /// </summary>
        public DateTime? ChangeTime
        {
            get { return this._changeTime; }
            set { this._changeTime = value; }
        }
        
        /// <summary>
        /// 对比两个UpPackBXinfo数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的UpPackBXinfo数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成UpPackBXinfo数据模型对象
            UpPackBXinfoMod upPackBXinfoMod = obj as UpPackBXinfoMod;
            //判断是否转换成功
            if (upPackBXinfoMod == null) return false;
            //进行匹配属性的值
            return
                //判断VerKey是否一致
                this.VerKey == upPackBXinfoMod.VerKey &&
                //判断Version是否一致
                this.Version == upPackBXinfoMod.Version &&
                //判断Content是否一致
                this.Content == upPackBXinfoMod.Content &&
                //判断ChangeTime是否一致
                this.ChangeTime == upPackBXinfoMod.ChangeTime;
        }
        /// <summary>
        /// 将当前UpPackBXinfo数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将UpPackBXinfo数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将VerKey进行按位异或运算处理
                (this.VerKey == null ? 2147483647 : this.VerKey.GetHashCode()) ^
                //将Version进行按位异或运算处理
                (this.Version == null ? 2147483647 : this.Version.GetHashCode()) ^
                //将Content进行按位异或运算处理
                (this.Content == null ? 2147483647 : this.Content.GetHashCode()) ^
                //将ChangeTime进行按位异或运算处理
                (this.ChangeTime == null ? 2147483647 : this.ChangeTime.GetHashCode());
        }
        /// <summary>
        /// 将当前UpPackBXinfo数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前UpPackBXinfo数据模型对象转换成字符串副本
            return
                "[" +
                //将VerKey转换成字符串
                this.VerKey + "," +
                //将Version转换成字符串
                this.Version + "," +
                //将Content转换成字符串
                this.Content +
                "]";
        }
    }
}
